<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="cn.netjava.pojo.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>person blog home page</title>
    <link rel="stylesheet" type="text/css" href="css/personblogpage.css" />
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    <div id="container">
       <div id="front">
          <jsp:include page="personfront.jsp"></jsp:include>
       </div>            
          
       <div id="main">
          <div id="left">
             <jsp:include page="personleft.jsp"></jsp:include>
          </div>
          
          
          <div id="center">
             <div class="center_column">
                 <div class="center_top">日记</div>
	           <%List<Article> articleList =(List<Article>)request.getAttribute("article");
	             if(null!=articleList){
	               for(Article article:articleList){
	           %>            
                 <div class="center_title"><a href="showonearticle.cn?articleid=<%=article.getId() %>&&uid=<%=article.getUser().getId() %>"><%=article.getArticle_title() %></a></div>
                 <hr><!-- %String id = request.getParameter("id"); %> -->
                 <div class="center_content">
                 <%if(article.getArtical_content().length()>50){ %>
                   <%=article.getArtical_content().substring(0,50)+"......" %>
                 <%}else{ %>
                   <%=article.getArtical_content()%>
                 <%} %>
                    <hr>
                    <div class="time">
                    <%=article.getIns_dt() %>
                    </div> 
                 </div>                           
               <%}} %>               
             </div>
             
             <%List<PhotoAlbum> photoAlbumList = (List<PhotoAlbum>)request.getAttribute("userPhotoAlbums"); %>
             <div class="center_column">
                 <div class="center_top">相册</div>
                 <div class="center_content">
                 <%if(null!=photoAlbumList){
                 for(PhotoAlbum photoAlbum:photoAlbumList){ %>
                    <div class="photo">                
	                    <a href="personphoto.cn?albumid=<%=photoAlbum.getId() %>&&uid=<%=photoAlbum.getUser().getId() %>"><img src="<%=photoAlbum.getPhotoAlbumCover() %>" width="114" height="114" /></a>
	                    <br>
	                    <a href="personphoto.cn?albumid=<%=photoAlbum.getId() %>&&uid=<%=photoAlbum.getUser().getId() %>"><%=photoAlbum.getPhotoAlbumName() %></a>
                    </div>
                 <%}} %>
                 </div>
             </div>
            
          </div>
          
       </div>
       
       <jsp:include page="../footer.jsp"></jsp:include>
    </div>
  </body>
</html>
